package com.ys.enume.finance;

//万里汇账号交易流水
public class TcwAccountCountForWanliEnum {
    //单据类型
    //0万里汇提款单、1万里汇CNY付款单、2预付款退回申请、3预付款退回、4货币兑换、5外币付款单
    public enum DocumentType {
        TCW_WanliDrawing("万里汇提款单", 0),
        TCW_WanliCnyPayment("万里汇CNY付款单", 1),
        TCW_PaymentReturn("预付款退回申请", 2),
        TCW_WanliPaymentReturn("预付款退回", 3),
        TCW_WanliCurrencyExchange("货币兑换", 4),
        TCW_WanliOtherPayment("外币付款单", 5),
        TCG_PurchaseOrderPay("采购付款单", 6),
        TCC_OnlinePurchaseReturn("线上采购退货", 7),
        TCG_Payment("采购付款", 9),
        ;
        public String name;
        public Integer value;

        private DocumentType(String name, Integer value) {
            this.name = name;
            this.value = value;
        }

        public static String getName(int value) {
            for (DocumentType e : DocumentType.values()) {
                if (e.value == value) {
                    return e.name;
                }
            }

            return "";
        }

        public static Integer getValue(String name) {
            for (DocumentType e : DocumentType.values()) {
                if (e.name.equals(name)) {
                    return e.value;
                }
            }
            return null;
        }
    }
}
